package com.zzw.hj1;

import java.util.*;

/**
 * @Project: hw_java
 * @Description: 字符串最后一个单词的长度
 * @Author: zzw
 */
public class Main {
    public static int lengthOfLast(String str) {
        String[] s = str.split(" ");
        return s[s.length - 1].length();
    }

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        System.out.println(lengthOfLast(str));
    }
}
